import Vue from "vue";
import Router from "vue-router";
import commonRouter from "./modules/common"; // 公共路由
import helpRouter from "./modules/help"; // 业务页面路由
Vue.use(Router);

export const constantRouterMap = [
  ...commonRouter,
  ...helpRouter
];

export default new Router({
  mode: "history", // require service support
  // 浏览器回退,切换路由时默认滚动的位置
  scrollBehavior: () => ({
    y: 0
  }),
  routes: constantRouterMap
});
